package Demo;

import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

//写一个泛型类，其中包含一个方法，这个方法是求任意类型数组的最大值的
public class Test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        /* Solution<String> stringSolution = new Solution<>();
        for (int i = 0; i < stringSolution.arrays.length; i++) {
            stringSolution.arrays[i] = scanner.nextLine();
        }
        System.out.println(stringSolution.calMax());*/
        Solution<Integer> integerSolution = new Solution<>();
        for (int i = 0; i < integerSolution.arrays.length; i++) {
            integerSolution.arrays[i] = scanner.nextInt();
        }
        System.out.println(integerSolution.calMax());
    }
}
class Solution<T> {

    Object[] arrays = new Object[10];
    public T calMax(){
         Arrays.sort(arrays);
         return (T) arrays[9];
    }

}
